Repository navigation
fix(core-sync): a key rotation never keeps a key device no device row holds - #4701
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
GET /v2/devices, every page, newServiceTransport::rows_with_key_devices). A certified key device no row holds was removed or signed out, so it joins the lost ones and is never offered, compared or not. Removing a row now drops every key device of it, the one from before a sign-out too (E2E F32).ReviewedDevice.can_keepsays what the person can tick;keep_by_defaultfollows it.finish_removalrefuses a keep the review did not offer andfinish_replaceone the draft did not offer (sync.not_allowed); a never-compared keep still answerskeys.not_compared. Both read the rows again before building, so a device that signed out or lost its row while the sheet was open is not kept.ReviewedDeviceInfo.can_keep. Key devices keep the names of rows the engine read earlier in the session, so the review names a removed row's key devices as the Devices list did, with no row.can_keepfrom the core and label a key device no row holds "Removed" instead of "Asks for approval again"./v2/syncansweringdevice_removedends the account's sign-in held under that token (SignOutCause::DeviceRevoked) at once (E2E F33).sync.device_removedno longer says to approve it.removing_a_device_needs_a_step_up_then_r_and_keeps_only_compared_devicesgives each device a row and adds a compared signed-out device; the Swift and C# review fixtures gaincanKeep.Test plan
device_flowsrotation::removing_a_row_drops_its_key_device_from_before_a_sign_out_though_it_was_compared,rotation::a_key_device_no_row_holds_is_never_offered_to_a_removal_even_when_compared,rotation::a_replace_never_keeps_a_compared_device_that_signed_out.rotation::a_device_that_signs_out_while_the_review_is_open_is_not_kept,rotation::a_device_that_signs_out_while_a_replace_draft_is_open_is_not_kept.the_rows_with_key_devices_come_from_every_page_of_the_device_list, thedevice_removedassertion ina_step_up_challenge_and_the_whole_request_refusals_read_as_their_errors, accounta_removed_row_heard_by_sync_signs_out_as_device_revoked, FFIa_key_device_whose_row_was_removed_keeps_the_name_the_engine_read_before.AccountRemovalFlowTests/removedDeviceIsNeverKept,AccountRecoveryKeyFlowTests/replaceSkipsRemovedDevice,AccountServicesTests/signOutCauseStaysUntilSignIn,AccountSettingsContentTests/signedOutAsRemoved,ProviderMovesTests/removedMacHasItsOwnWords.verify.sh --jobs 4):core tablepro-syncPASS 1031/1031,core tablepro-sync-testingPASS 100/100,core tablepro-accountPASS 212/212,core tablepro-ffiPASS 524/524,--platform windows bindingsregenerated (can_keeponly), WindowsTablePro.App.Model.Tests1287 passed on the Mac,lintPASS on every changed Swift file.verify.sh --jobs 4 testof the 8 suites above and around it): PASS 162/162;l10nPASS after adding the two new strings.verify.sh ios AccountCoreSignInTests AccountModelTests, core rebuilt with the simulator slice): PASS 13/13.